import { fromJS } from 'immutable';
import * as constants from './constants'
    
const defualtState = fromJS({
    title: '需求管理规范',
    content:'<p>MOMO云敏捷项目管理，融合了敏捷、DevOps思想，打通了整个从需求、研发、测试、运维、运营的端到端敏捷。在实践中通过运维自动化，将Scrum敏捷团队开发的产品快速上线，并通过及时的运营，反馈给敏捷团队进行方向调整。</p><img src="https://upload-images.jianshu.io/upload_images/2227009-4e58b6c33c6e67ba.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp"/>'
})

export default (state = defualtState, action) => {
    switch (action.type) {
        case constants.CHANGE_DETAIL:
            return state.merge({
                title: action.title,
                content:action.content
            })
        default:
            return state;
    }   
}